package d0316;

public class ThreadStopExample extends Thread {
    private boolean isRunning=true;
    public void run(){
        while(isRunning){
            System.out.println("当前线程正在运行");
        }
        isRunning=false;
    }

    public static void main(String[] args) {
        ThreadStopExample ThreadStopExample=new ThreadStopExample();
        ThreadStopExample.start();
        ThreadStopExample.stopthread();
    }

    private void stopthread() {
    }

}
